package com.xxx.service.impl;

import com.xxx.aop.LogAnnotation;
import com.xxx.mapper.UserMapper;
import com.xxx.po.User;
import com.xxx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;

@Transactional
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    @LogAnnotation
    public User findUser(String username, String password) {
        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
        objectObjectHashMap.put("username",username);
        objectObjectHashMap.put("password",password);
        User user = userMapper.findUser(objectObjectHashMap);
        return user;
    }
}
